
import React from "react";
import {Form, Input} from "antd";


class FormMulInput extends React.Component{
    constructor(props) {
        super(props);
        this.state={}
    }

    render() {
        const {TextArea} = Input;
        const {getFieldDecorator} =  this.props.form;
        const {label,field,initialValue,rules,placeholder,rows,allowClear} = this.props;
        return (
            <Form.Item label={label ? label : "多行输入框"}>
                {getFieldDecorator(field ? field : "default_mul_input", {initialValue: initialValue,rules: rules ? rules : []})(
                    <TextArea
                        placeholder={placeholder ? placeholder : "请输入..."}
                        rows={rows ? rows : 4}
                        allowClear={allowClear ? allowClear : true}
                    />
                )}
            </Form.Item>
        );
    }
}

export default FormMulInput;
